# encoding: utf-8
# @Author: zsl
# @Time  : 2024/09/26 23:09
# @Desc :浮点数

# 浮点数计算
n1 = 2.1
n2 = 12.256
print(n1 + n2)

# 四舍五入round
n3 = round(n1 + n2, 2)
print(n3)

import math

# 向上取整 ceil
n4 = math.ceil(n1 + n2)
print("向上取整的结果是：", n4)

# 向下取整 floor
n5 = math.floor(n1 + n2)
print("向下取整的结果是：", n5)
